//
//  HTRetweetStatus.swift
//  weibo
//
//  Created by JonsonLiu on 2017/3/8.
//  Copyright © 2017年 JonsonLiu. All rights reserved.
//

import UIKit

class HTRetweetStatus: UIView {

    var stateVoewModel : StatesViewModel?{
    
        didSet{
            turnLable.text = stateVoewModel?.states?.retweeted_status?.text
        }
    }
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI(){
        backgroundColor = UIColor.gray
        addSubview(turnLable)
        
        turnLable.snp.makeConstraints { (make) in
            make.leading.top.equalTo(self).offset(10)
            make.bottom.equalTo(self.snp.bottom).offset(10)
        }
        
    }

    
    lazy var turnLable : UILabel = {
    
        let turnLable = UILabel()
        
        turnLable.textColor = UIColor.black
        
        turnLable.font = UIFont.systemFont(ofSize: 10)
        
        turnLable.preferredMaxLayoutWidth = UIScreen.main.bounds.size.width - 2*10
        turnLable.numberOfLines = 0
        return turnLable
    }()
    
}
